//detail页面控制器
angular.module('detailModule.controller',['detailModule.service'])
    .controller('detailController',['$scope','$stateParams','detailFactory',function($scope,$stateParams,detailFactory){
        $scope.type=$stateParams.type

        $scope.moviesDetil={}
        $scope.loading=true

        $scope.getData=function(){
            $scope.loading=true
            detailFactory.getData($scope.type,function(data){
                $scope.moviesDetil = data;
                $scope.loading=false;
                $scope.$apply();
            })
        }
        $scope.getData();
    }])